#!/usr/bin/env node

var path = require('path');

var cli = '';
if (process.argv.length > 2) {
    cli = process.argv[2];
}
switch (cli) {
    case 'init':
        require('njserver/init').init();
        break;
    case 'update':
        require('njserver/init').update();
        break;
    case 'start':
        require(path.join(process.cwd(), './app'));
        break;
    default:
        console.log('请传入命令参数：');
        console.log('\tinit\t\t初始化项目文件');
        console.log('\tupdate\t\t更新项目文件');
        console.log('\tstart\t\t启动njserver程序');
        break;
}